package com.imooc.spark

import org.apache.spark.sql.SparkSession


/**
 * SparkSession的使用
 */
object SparkSessionApp {
  def main(args: Array[String]): Unit = {
    val path = args(0)

    val spark = SparkSession
      .builder()
      .appName("SparkSessionApp")
      .getOrCreate()

    val df = spark.read.format("json").load(path)
    df.show()

    spark.close()
  }
}
